.bin-checkbox-wrapper {
  cursor: pointer;
  font-size: $base-font-size;
  display: inline-block;
  margin-right: 8px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  &:focus .bin-checkbox-checked .bin-checkbox-inner {
    border-color: $color-primary-light1;
    outline: 0;
    box-shadow: 0 0 0 2px $color-input-shadow;
  }
}

.bin-checkbox {
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
  position: relative;
  margin-right: 5px;
  &-inner {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
    top: 0;
    left: 0;
    border: $border-base;
    border-radius: $border-base-radius;
    background-color: $color-white;
    transition: border-color .2s ease-in-out, background-color .2s ease-in-out, box-shadow .2s ease-in-out;
    &:after {
      content: "";
      position: absolute;
      display: table;
      width: 5.7px;
      height: 9px;
      top: 47%;
      left: 22%;
      border: 2px solid #fff;
      border-top: 0;
      border-left: 0;
      transform: rotate(45deg) scale(1) translate(-50%, -50%);
      transition: all .2s ease-in-out;
      border-top: 0;
      border-left: 0;
    }
  }
  &-checked {
    .bin-checkbox-inner {
      border-color: $color-primary;
      background-color: $color-primary;
    }
  }
  &-focus {
    box-shadow: 0 0 0 2px $color-input-shadow;
    transition: all .2s ease-in-out;
  }
  &:hover {
    .bin-checkbox-inner {
      border-color: $color-primary-light2;
    }
  }
  &-input {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    cursor: pointer;
    opacity: 0;
  }
}

.bin-checkbox-group {
  font-size: 14px;
}
.bin-checkbox-group-item, .bin-switch {
  display: inline-block;
}
.bin-checkbox-wrapper-disabled {
  cursor: not-allowed;
}
.bin-checkbox-disabled {
  cursor: not-allowed;
}
.bin-checkbox-input[disabled] {
  cursor: not-allowed;
}
.bin-checkbox-disabled.bin-checkbox-checked .bin-checkbox-inner {
  background-color: #f3f3f3;
  border-color: #dcdee2;
}
.bin-checkbox-disabled.bin-checkbox-checked .bin-checkbox-inner:after {
  -webkit-animation-name: none;
  animation-name: none;
  border-color: #ccc;
}
.bin-checkbox + span, .bin-checkbox-wrapper + span {
  margin-right: 4px;
}
.bin-checkbox-disabled + span {
  color: #ccc;
  cursor: not-allowed;
}
.bin-checkbox-disabled .bin-checkbox-inner:after {
  -webkit-animation-name: none;
  animation-name: none;
  border-color: #f3f3f3;
}
.bin-checkbox-disabled .bin-checkbox-inner {
  border-color: #dcdee2;
  background-color: #f3f3f3;
}
.bin-checkbox-indeterminate .bin-checkbox-inner {
  background-color: $color-primary;
  border-color: $color-primary;
}
.bin-checkbox-indeterminate .bin-checkbox-inner:after {
  content: "";
  width: 9.1px;
  height: 1px;
  transform: scale(1) translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
}


.bin-checkbox-group .bin-checkbox-checked .bin-checkbox-focus {
  box-shadow: 0 0 0 2px $color-input-shadow;
  transition: all .2s ease-in-out;
}
